<template>
  <div>
    <display :code="code" />
    <router-link to="/demo">demo</router-link>
  </div>
</template>

<script>
import Display from "@/components/display/index.vue";
export default {
  components: {
    Display,
  },
  data() {
    return {
      code: null,
    };
  },
  created() {
    this.code = `<template>
      <input v-model="msg" />
    </template>
    <script>
    export default {
      data() {
        return {
          msg: "哈哈"
        }
      }
    }
    <\/script>
    <style>
      * {
        color: #f60;
      }
    </style>`;
  },
};
</script>
